package com.tmt.im.common.pojo;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.SuperBuilder;
import org.apache.ignite.cache.query.annotations.QuerySqlField;

import java.io.Serial;
import java.sql.Timestamp;

/**
 * 聊天会话成员状态对象
 *
 * @Description TODO
 * @Author wuyi
 * @Date 2024/8/7 15:07
 * @Version 1.0
 **/
@Getter
@Setter
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
public class MemberStatusPoJo implements IGetKey<Long> {

    @Serial
    private static final long serialVersionUID = -5599356466969798542L;

    public static final String CACHE_NAME = "chat_session_member_status";

    @QuerySqlField(name = "member_id", index = true)
    private Long memberId;

    /**
     * 当前用户所在的聊天会话ID
     */
    @QuerySqlField(name = "session_id", index = true)
    private Long sessionId;

    @JsonIgnore
    private boolean insert = true;

    @Override
    public Long getKey() {
        return memberId;
    }

}
